#include<iostream>
#include<string>
#include<cctype>

using namespace std;

void exchage(string&);

int main()
{
    string str,temp;
    cout << "Enter a string(q to quit):";
    getline(cin,str);
    while ( str != "q" && str != "Q")
    {
        exchage(str);
        cout << str <<endl;
        cout << "Next string(q to quit):";
        getline(cin,str);
    }
    cout << "Bye.";

    return 0;
}

void exchage(string& str)
{
    for ( int i = 0; i < str.size(); i++)
    {
        if ( isalpha(str[i]))
        str[i] = toupper(str[i]);
    }
}